<?php

class GrapeMenu {

    public function renderGrapeMenu($items = null) {
        if ($items == null)
            return "";

        $render = '';
        $render .=
                '<div class="grid_12">';
        foreach ($items as $label => $urls) {
            $concanateUrl = "";
            $concanateUrl = array(Yii::app()->controller->id . "/" . $urls); // get appropriate url instead of just action only (may cause misleading)

            $render .= CHtml::link($label, $concanateUrl, array('class' => 'button', 'style' => "width: 120px; text-align: center;"));
            $render .= "&nbsp;";
        }
        $render .=
                '</div>';

        return $render;
    }

}
?>
